852639fb077c06500c38c05df346b2ae08e9676a,plugins/git4idea/src/git4idea/changes/ChangeCollector.java,ChangeCollector,addToPaths,#FilePath#Collection#FilePath#,158

Before Change


   * @return true if all repository is dirty, false if not.
   */
  private static boolean addToPaths(FilePath root, Collection<FilePath> paths, FilePath toAdd) {
    final VirtualFile gitRoot = GitUtil.getGitRootOrNull(toAdd);
    // the check is needed for multi-repository configurations (otherwise will try to get status of directories outside the repository).
    if (gitRoot == null || !gitRoot.getPath().equals(root.getPath())) {
      return false;
    }

    if (root.isUnder(toAdd, true)) {
      // the dirty directory which is being added contains the root => the whole repository is dirty
      return true;
    }
    for (Iterator<FilePath> i = paths.iterator(); i.hasNext();) {
      FilePath p = i.next();
      if (p.isUnder(toAdd, true)) {
        i.remove();
      }
      if (toAdd.isUnder(p, false)) {
        return false;
      }
    }
    paths.add(toAdd);

After Change


   * @param toAdd the path to add
   */
  void addToPaths(FilePath root, Collection<FilePath> paths, FilePath toAdd) {
    if (GitUtil.getGitRootOrNull(toAdd) != myVcsRoot) {
      return;
    }
    if (root.isUnder(toAdd, true)) {